package top.glkj.hms.service.impl;

import org.springframework.stereotype.Service;
import top.glkj.hms.dao.HotelFacilitiesDao;
import top.glkj.hms.entity.HotelFacilities;
import top.glkj.hms.service.HotelFacilitiesService;
import top.glkj.hms.utils.GlUtils;
import top.glkj.hms.utils.Result;

import java.util.List;

/**
 * @author : xgl
 * @version : 0.0.1
 * @date :2021/2/27 16:34
 */
@Service
public class HotelFacilitiesServiceImpl implements HotelFacilitiesService {
    private final HotelFacilitiesDao hotelFacilitiesDao;

    public HotelFacilitiesServiceImpl(HotelFacilitiesDao hotelFacilitiesDao) {
        this.hotelFacilitiesDao = hotelFacilitiesDao;
    }

    /**
     * 获取所有用户，按分页方式
     *
     * @return List<T>
     */
    @Override
    public Result getAll() {
        List<HotelFacilities> all = hotelFacilitiesDao.findAll();
        return getNotEmptyAll(all);
    }

    /**
     * 获取所有用户，按分页方式
     *
     * @param id id
     * @return T t
     */
    @Override
    public Result getOne(Long id) {
        return null;
    }

    /**
     * 修改或者保存
     *
     * @param hotelFacilities T t
     * @return true or false
     */
    @Override
    public Result save(HotelFacilities hotelFacilities) {
        return null;
    }

    /**
     * 彻底从数据库中删除实体{T}
     *
     * @param hotelFacilities T t
     * @return true or false
     */
    @Override
    public Result delete(HotelFacilities hotelFacilities) {
        return null;
    }

    /**
     * 标记删除
     *
     * @param hotelFacilities T t
     * @return true or false
     */
    @Override
    public Result remove(HotelFacilities hotelFacilities) {
        return null;
    }

    @Override
    public Result addHotelFacilities(HotelFacilities hotelFacilities) {
        return null;
    }

    @Override
    public Result getAllHotelFacilitiesByPageAndSize(int page, int size) {
        GlUtils<HotelFacilities,HotelFacilitiesDao> glUtils = new GlUtils<>();
        return glUtils.getAllByPageAndSize(page,size,hotelFacilitiesDao);
    }

    /**
     * 更新
     *
     * @param hotelFacilities HotelFacilities
     * @return 更新结果
     */
    @Override
    public Result updateHotelFacilities(HotelFacilities hotelFacilities) {
        return null;
    }
}
